//---------------------------------------------------------------------------

#ifndef EnvoiGEDH
#define EnvoiGEDH
//---------------------------------------------------------------------------
#ifdef _GED_DLL
  #define GEDAPI __declspec(dllexport)
#else
  #define GEDAPI __declspec(dllimport)
#endif

#define NomAppliGED               "GED'EIC"

#define CLASSEMENT_NON_REMPLI "_MANUEL_"
#define CLASSEMENT_AUTO       "_CLASS_AUTO_"
//---------------------------------------------------------------------------
#ifdef         __cplusplus
extern GEDAPI bool     GED_gGestionEnvoi;
typedef struct{
  int  nOLEInitialise;
  void *pFileDefautCap;
  bool bClassAuto;
  bool bCapture;
}CGEDGlobal;
extern GEDAPI CGEDGlobal *GEDGlobal;
bool GEDAPI __fastcall GED_IsInstallee();
bool GEDAPI __fastcall GED_IsClassAuto();

#ifdef __BCPLUSPLUS__
AnsiString __fastcall GED_NomPilote();
AnsiString __fastcall GED_NomPilotePaniere();
void       __fastcall GED_Capture( Variant *pvGedEIC, int &DestGED);

bool         GEDAPI __fastcall GED_IsPrinterGED( const AnsiString & PrinterName);
TModalResult GEDAPI __fastcall GED_Envoi(Variant *pvGedEIC, const WideString &Classement, const AnsiString &NomDocument, int &DestGED, AnsiString &NomImprimante);

bool GEDAPI __fastcall GED_Ouvre(        Variant *pvGedEIC);
bool GEDAPI __fastcall GED_Ferme(        Variant *pvGedEIC);
bool GEDAPI __fastcall GED_DebutDocument(Variant *pvGedEIC, const WideString &Classement, int &DestGED, const AnsiString &NomDocument, AnsiString &NomImprimante);
bool GEDAPI __fastcall GED_FinDocument(  Variant *pvGedEIC);
AnsiString GEDAPI __fastcall GED_DonnerDocumentSelectionne(Variant *pvGedEIC);
bool GEDAPI __fastcall GED_AfficherDocument(Variant *pvGedEIC,const AnsiString &Image);
bool GEDAPI __fastcall GED_RecupererDocumentTmp(Variant *pvGedEIC,const AnsiString &pImage, const AnsiString &pRepDestination, AnsiString &pNomFichierExporte);
bool GEDAPI __fastcall GED_EnregistrerDocument(Variant *pvGedEIC,const AnsiString &pImage,const AnsiString &pNomFichier);

#endif

bool GEDAPI __stdcall GED_Ouvre(       long &pvGedEIC);
bool GEDAPI __stdcall GED_Ferme(       long &pvGedEIC);
bool GEDAPI __stdcall GED_DebutDocument(long pvGedEIC, const char* Classement, int &DestGED, const char *NomDocument, char *NomImprimante, int);
bool GEDAPI __stdcall GED_FinDocument  (long pvGedEIC);

// pour RHPAYE
extern "C" bool __stdcall GEDAPI  GED_Debut(char * szNomImprimante, int nTaille);
extern "C" bool GEDAPI __stdcall GED_Fin();
extern "C" bool GEDAPI __stdcall GED_EstInstallee1();

#endif
//---------------------------------------------------------------------------

#endif
 
